package com.dhgate.spu.analysis.consts;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.solr.client.solrj.impl.HttpSolrServer;

import com.dhgate.spu.analysis.bean.Attr;
import com.dhgate.spu.analysis.dao.ConnectionPool;
import com.dhgate.spu.analysis.dao.ConnectionPoolAbs;
import com.dhgate.spu.analysis.util.ComparatorUtil;

/**
 * @author: wangguodong
 * @create: 2014-2-13 下午1:43:22
 * @description:
 */
public class SysConsts {
	/** ********************** 数据库配置 ******************************** */
	/**
	 * ********************** 数据库配置 SearchDB start
	 * ********************************
	 */
	
	public static String FILE_SEPARATOR = System.getProperty("file.separator");
	public static String BASE_DIR = System.getProperty("user.dir")+FILE_SEPARATOR+"conf"+FILE_SEPARATOR;
	public static String CONST_DBXML_PATH = BASE_DIR + "dbconfig.xml";
	public static String CONST_SYNOYM_FILE_PATH = BASE_DIR + "synonyms.txt";
	public static String CONST_PARAMXML_PATH = BASE_DIR + "parameter.xml";
	public static String CONST_SPU_STANDARD_XML_PATH = BASE_DIR+ "spu-standard.xml";
	

	public static String CONST_SEARCHDB_DBDRIVER = "com.mysql.jdbc.Driver";

	public static String CONST_SEARCHDB_DBURL;

	public static String CONST_SEARCHDB_DBUSERNAME;

	public static String CONST_SEARCHDB_DBPASSWORD;

	public static String dbUser = "";

	public static int listThreadCount = 1;

	public static int Pool_SEARCHDB_InitConns = 2;

	public static int Pool_SEARCHDB_IncrmentConns = 2;

	public static int Pool_SEARCHDB_MaxConns = 10;

	public static int Pool_SEARCHDB_WaitConn = 1000;
	/**
	 * ********************** 数据库配置 SearchDB end
	 * ********************************
	 */

	/**
	 * ********************** 数据库配置 dhproDB start
	 * ********************************
	 */
	public static String CONST_DHPRODB_DBDRIVER = null;

	public static int Pool_DHPRODB_IncrmentConns = 0;

	public static int Pool_DHPRODB_InitConns = 0;

	public static int Pool_DHPRODB_MaxConns = 0;

	public static int Pool_DHPRODB_WaitConn = 0;

	public static Map<String, String> DBURL_MAP = new HashMap<String, String>();

	/**
	 * 连接池的map,key:url,val:pool
	 */
	public static Map<String, ConnectionPoolAbs> CONNPOOLABSMAP = new HashMap<String, ConnectionPoolAbs>();

	/**
	 * 连接池的map,key:url,val:pool
	 */
	public static Map<String, ConnectionPool> CONNPOOLMAP = new HashMap<String, ConnectionPool>();
	
	/**
	 * mysql中产品表的后缀list
	 */
	public static List<String> MYSQL_TABLE_KEY_LIST = new ArrayList<String>();
	
    
	// solr 参数
	public static String SOLR_URL;
	public static int SOLR_BATCH_ADD_SIZE;
	public static int SOLR_TIME_OUT;
	public static HttpSolrServer SOLR_SERVER = null;
	
	// dao配置
	public static String DAO_NAME;

	

}
